package org.linlinjava.litemall.admin.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.linlinjava.litemall.admin.beans.annotation.LogAnno;
import org.linlinjava.litemall.admin.service.AdminLumiereCouponUserService;
import org.linlinjava.litemall.admin.vo.coupon.CouponStatisticDetailReqVO;
import org.linlinjava.litemall.admin.vo.coupon.CouponStatisticReqVO;
import org.linlinjava.litemall.core.util.ResponseUtil;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

@Api(tags = "优惠券用户")
@RequestMapping("/admin/couponUser")
@RestController
@RequiredArgsConstructor
public class AdminLumiereCouponUserController extends ResponseUtil {

    private final AdminLumiereCouponUserService adminLumiereCouponUserService;

    @ApiOperation("优惠券用户-「概况｜查询」")
    @GetMapping("/general")
    @LogAnno
    public Response general(){
        return adminLumiereCouponUserService.general();
    }

    @ApiOperation("优惠券用户-「策略｜统计」")
    @PostMapping("/strategyCouponStatistic")
    @LogAnno
    public Response strategyCouponStatistic(@Validated  @RequestBody CouponStatisticReqVO reqVO){
        return adminLumiereCouponUserService.strategyCouponStatistic(reqVO);
    }


    @ApiOperation("优惠券用户-「策略｜统计 详情」")
    @PostMapping("/strategyCouponStatisticDetail")
    @LogAnno
    public Response strategyCouponStatisticDetail(@Validated  @RequestBody CouponStatisticDetailReqVO reqVO){
        return adminLumiereCouponUserService.strategyCouponStatisticDetail(reqVO);
    }

}
